﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Configuration;

namespace MedicalSystem.SmartReport.Host.Configuration
{
   public static class CustomPropertySettings
    {
       
        private static Dictionary<string, string> namedTypeDictionary = new Dictionary<string, string>();

        static CustomPropertySettings()
        {
            CustomPropertyCollection collection = GetConfigurationSection().CustomProperties;

            foreach (CustomPropertyElement element in collection)
            {
                namedTypeDictionary.Add(element.Name, element.Caption);
            }
        }

        public static CustomlPropertySection GetConfigurationSection()
        {
            return (CustomlPropertySection)ConfigurationManager.GetSection("customControlPropertySettings");
        }

        public static Dictionary<string, string> GetNamedProperties()
        {
             return namedTypeDictionary;
        }
    }
}
